package treenode;



public class ParserTest{
  public static void main(String[] args)  {
    Parser parser = new Parser("1 + ( 2 - 3 * 4 ) / 5"); // spaces are vital!!;
    TreeNode rootNode = parser.parse();

    System.out.print("PRE-ORDER: ");
    rootNode.preFixPrint();
    System.out.println();
    System.out.print("IN-ORDER: ");
    rootNode.inFixPrint();
    System.out.println();
    System.out.print("POST-ORDER: ");
    rootNode.postFixPrint();
    System.out.println();
    
    System.out.println(rootNode.compute());
  }
}